package xg.glycomaid;
import java.net.URL;
import java.text.DecimalFormat;
import java.text.NumberFormat;


public class OutputRow {

	private String mzintString;
	private String composition;
	private String mzintNormString;
	private String mzCalcu;
	public DecimalFormat df; 
	private URL url;
	private String confidence;
	private String source;


	public OutputRow(String composition, URL url) {
		df=(DecimalFormat)NumberFormat.getInstance();
		df.setGroupingUsed(false);

		this.composition =composition;
		confidence="";
		this.url = url;
	}

	public OutputRow()
	{
		df=(DecimalFormat)NumberFormat.getInstance();
		df.setGroupingUsed(false);
	}
	
	public OutputRow(double mz, double inten)
	{
		df=(DecimalFormat)NumberFormat.getInstance();
		df.setGroupingUsed(false);
		this.mzintString = new String(df.format(mz)+"/"+df.format(inten));
	}
	
	public OutputRow(URL url)
	{
		df=(DecimalFormat)NumberFormat.getInstance();
		df.setGroupingUsed(false);
		
		this.mzintString = "";
		this.composition ="";
		mzintNormString = "";
		confidence="";
		this.url = url;
	}
	
	public URL getURL() {
		return url;
	}

	public void setURL(URL url) {
		this.url = url;
	}

	public void setComposition(String composition) {
		this.composition = composition;
	}

	public String getComposition() {
		return composition;
	}
	
	public String getMzintString() {
		return mzintString;
	}
	
	public void setMzintString(Double mz, Double intensity) {
		this.mzintString = new String(df.format(mz)+"/"+ df.format(intensity));
	}

	public void setMZintString(String comMZ, String comInt) {
		this.mzintString = new String(comMZ+"/"+ comInt);
	}

	public String getMzintNormString() {
		return mzintNormString;
	}

	public void setMZintNormString(String mzNorm, String intNorm) {
		this.mzintNormString =  new String(mzNorm+"/"+ intNorm);
	}
	
	public String getConfidence() {
		return confidence;
	}

	public void setConfidence(String confidence) {
		this.confidence = confidence;
	}


	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getMzCalcu() {
		return mzCalcu;
	}

	public void setMzCalcu(String mzCalcu) {
		this.mzCalcu = mzCalcu;
	}

	
	public String toString()
	{
		
		String a =new String(this.mzintString+"\t"+this.composition+"\t"+this.mzintNormString+"\t"+this.confidence);
		return a;
	}
}
